<?php
class comment extends Zcontroller{
	
	function __construct() {
		parent::__construct();
		//menu current page
		Zsession::setDataToSession("current_page", "classify");	
	
	}
	
	function post_comments(){
		$this->load->model("m_comment");
		$this->load->library('form_validation');
		$Z_USER = Zsession::getUserFromSession(); 
			if(isset($Z_USER["user_id"])){
				$this->m_comment->insert_class_comments(
						  $_POST["product_id"],
						  $Z_USER["user_id"],
						  $Z_USER["user_login"],
						  $_POST["textComment"]);
				redirect(site_url("classify/goto_classify_detail/".$_POST["product_id"]));
			}else {
				redirect(site_url("users"));
			}
	}
}